package br.com.fcomota.pi_iv_sie;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import br.com.fcomota.pi_iv_sie.dao.Dao_Novo_Cad_Formulario;
import br.com.fcomota.pi_iv_sie.modelo.Usuario;
import br.com.fcomota.pi_iv_sie.utils.BD_SQLite;

/**
 * Created by Francisco Mota.
 */
public class LoginActivity  extends Activity {
    private Usuario usuario = new Usuario();
    private Button Login;
    private EditText USERNAME,USERPASS;
    private Context CTX = this;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login_layout);

        Login = (Button) findViewById(R.id.b_login);
        USERNAME = (EditText) findViewById(R.id.user_name);
        USERPASS = (EditText) findViewById(R.id.user_pass);
        Login.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(getBaseContext(), "login()...", Toast.LENGTH_LONG).show();
                usuario.setNome( USERNAME.getText().toString());
                usuario.setSenha(USERPASS.getText().toString());
                BD_SQLite BS = new BD_SQLite(CTX);



            }
        });
      }

  }